/*
 * Copyright 2008 Nathan C Jones
 * 
 * This file is part of Fivehundred.
 * 
 * Fivehundred is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * Fivehundred is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * Fivehundred. If not, see <http://www.gnu.org/licenses/>. 
 */

package com.googlecode.fivehundred.model;

import java.util.Collection;

/**
 * A collection of cards which will notify observers when its state changes.
 * 
 * @author Nathan C Jones
 */
public interface CardCollection extends Collection<Card> {

	/**
	 * Add a card collection listener so it receives notifications of changes to
	 * the card collection. If the lister has already been registered with the
	 * collection then no action is taken.
	 * 
	 * @param listener the listener to register.
	 */
	void addCardCollectionListener(CardCollectionListener listener);

	/**
	 * Remove a card collection listener so it no longer receives notifications
	 * of changes to the card collection. If the listener is not already
	 * registered with the collection then no action is taken.
	 * 
	 * @param listener the listener to remove.
	 */
	void removeCardCollectionListener(CardCollectionListener listener);

}